//
//  UIFont+MyFont.m
//  ZDSApp
//
//  Created by lei on 16/8/29.
//  Copyright © 2016年 lei. All rights reserved.
//

#import "UIFont+MyFont.h"
#import "UIView+Frame.h"

@implementation UIFont (MyFont)

+ (UIFont *)FontWithSize:(CGFloat)size {
    CGFloat realSize = size * ratio;
    return [UIFont systemFontOfSize:realSize];
}

@end

@implementation UIImage (MyImage)

+ (UIImage *)imageOfBundleNamed:(NSString *)name{

//    UIImage *image = nil;
//
//
//
//    NSString *image_name = [NSString stringWithFormat:@"%@.png", name];
//
//    NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
//
//    NSString *bundlePath = [resourcePath stringByAppendingPathComponent:bundleName];
//
//    NSString *image_path = [bundlePath stringByAppendingPathComponent:image_name];;
//
//    image = [[UIImage alloc] initWithContentsOfFile:image_path];
//
//    return image;
    
    
        NSString *image_name = [NSString stringWithFormat:@"%@", name];

        NSBundle *currentBundle = [NSBundle bundleForClass:[self class]];
        //图片名称要写全称
        NSString *patch = [currentBundle pathForResource:image_name ofType:@"png" inDirectory:@"barscan.bundle"];
        return [UIImage imageWithContentsOfFile:patch];
    
}


@end



